<script language="JavaScript" type="text/javascript">
<!--
function chkFormular() {
	if(document.getElementById('gbname').value == "") {
		alert('%enter_your_name%');
		document.getElementById('gbname').focus();
   	return false;
	}
  if(document.getElementById('gbmessage').value == "") {
		alert('%enter_a_message%');
		document.getElementById('gbmessage').focus();
   	return false;
	}
  if(document.getElementById('gbcaptcha').value == "") {
		alert('%error_captcha%');
		document.getElementById('gbcaptcha').focus();
   	return false;
	}
	if(!validbbcode(document.getElementById('gbmessage').value)){
		return false;
	}
}
-->
</script>

<form id="post" name="post" method="post" action="guestbook.php" onsubmit="return chkFormular()">
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="$border">
  <tr>
    <td align="center" bgcolor="$bghead" class="title">%new_entry%</td>
  </tr>
  <tr><td bgcolor="$pagebg"></td></tr>
  <tr>
    <td bgcolor="$bg1">
    <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
      <tr>
        <td colspan="4">
        <table border="0" cellspacing="0" cellpadding="2">
          <tr>
        	<td align="center" colspan="2"><font color="#CC0000"><b>$error</b></font></td>
      	  </tr>
          <tr>
            <td>%name%:</td>
            <td><input id="gbname" name="gbname" type="text" size="40" /></td>
          </tr>
          <tr>
            <td>%mail%:</td>
            <td><input name="gbemail" type="text" size="40" /></td>
          </tr>
          <tr>
            <td>%icq%:</td>
            <td><input name="icq" type="text" size="40" /></td>
          </tr>
          <tr>
            <td>%homepage%:</td>
            <td><input name="gburl" type="text" value="http://" size="40" /></td>
          </tr>
          <tr>
            <td colspan="2">%security_code%:</td>
          </tr>
          <tr>
            <td>$captcha</td>
            <td><input id="gbcaptche" name="captcha" type="text" value="" size="5" /><input name="captcha_hash" type="hidden" value="$hash" /></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td colspan="2">$addbbcode</td>
      </tr>
      <tr>
        <td colspan="2"><b>%your_message%:</b><br />
        <textarea id="gbmessage" name="message" rows="5" cols="35" style="width:99%;">$message</textarea></td>
      </tr>
      <tr>
        <td><small><b>%options%:</b> &#8226; %html% &#8226; %bbcode% &#8226; %smilies%</small></td>
        <td align="right"> <input name="save" type="submit" value="%submit%" /></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
</form>